离散随机变量的方差
如果你从离散随机变量中抽取一组观测值,你可以计算这些观测值的方差。随着观测值的数量增加,这个值将越来越接近离散随机变量的方差。
If you take a set of observations from a discrete random variable, you can find the variance of those observations. As the number of observations increases, this value will get closer and closer to the variance of the discrete random variable.
记号说明 / Notation:
方差有时用 \(\sigma^2\) 表示,其中 \(\sigma\) 是标准差。
The variance is sometimes denoted by \(\sigma^2\), where \(\sigma\) is the standard deviation.
方差的定义
Definition of Variance
\[\operatorname{Var}(X) = \mathrm{E}[(X - \mathrm{E}(X))^2]\]
随机变量 \((X - \mathrm{E}(X))^2\) 是 \(X\) 与其期望值的平方偏差。当 \(X\) 取与 \(\mathrm{E}(X)\) 差异很大的值时,这个值会很大。
The random variable \((X - \mathrm{E}(X))^2\) is the squared deviation from the expected value of \(X\). It is large when \(X\) takes values that are very different to \(\mathrm{E}(X)\).
有时使用另一个公式更容易计算方差:\(\operatorname{Var}(X) = \mathrm{E}(X^2) - [\mathrm{E}(X)]^2\)。
Sometimes it is easier to calculate the variance using the formula \(\operatorname{Var}(X) = \mathrm{E}(X^2) - [\mathrm{E}(X)]^2\).
从定义可以看出,对于任何随机变量 \(X\),\(\operatorname{Var}(X) \geq 0\)。离散随机变量的方差是随机变量分布的散布程度的度量,它决定了随机变量的值与期望值相差的程度。换句话说,\(\operatorname{Var}(X)\) 的值越大,随机变量取与期望值差异很大的值的可能性就越大。
From the definition you can see that \(\operatorname{Var}(X) \geq 0\) for any random variable \(X\). The variance of a discrete random variable is a measure of spread for a distribution of a random variable that determines the degree to which the values of a random variable differ from the expected value. In other words, the larger the value of \(\operatorname{Var}(X)\), the more likely it is to take values significantly different to its expected value.
例 6.4.1 / Example 6.4.1:
掷一颗公平的六面骰子。最上面的面的点数用随机变量 \(X\) 表示。
A fair six-sided dice is rolled. The number on the uppermost face is modelled by the random variable \(X\).
求 \(\operatorname{Var}(X)\)。
Find \(\operatorname{Var}(X)\).
方法一 / Method 1:
我们知道 \(\mathrm{E}(X) = 3.5\)(这在例6.3.1中计算过)。
We have that \(\mathrm{E}(X) = 3.5\) (this was calculated in Example 7).
\(X\)、\(X^2\) 和 \((X - \mathrm{E}(X))^2\) 的分布如下表:
The distributions of \(X\), \(X^2\) and \((X - \mathrm{E}(X))^2\) are given by:
| \(x\) | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| \(x^2\) | 1 | 4 | 9 | 16 | 25 | 36 |
| \((x - \mathrm{E}(X))^2\) | 6.25 | 2.25 | 0.25 | 0.25 | 2.25 | 6.25 |
| \(P(X = x)\) | \(\frac{1}{6}\) | \(\frac{1}{6}\) | \(\frac{1}{6}\) | \(\frac{1}{6}\) | \(\frac{1}{6}\) | \(\frac{1}{6}\) |
所以方差为:
So the variance is
\[\operatorname{Var}(X) = \sum (x - \mathrm{E}(X))^2 P(X = x)\]
\[= 6.25 \times \frac{2}{6} + 2.25 \times \frac{2}{6} + 0.25 \times \frac{2}{6}\]
\[= (6.25 + 2.25 + 0.25) \times \frac{1}{3} = \frac{35}{12}\]
方法二 / Method 2:
\(X^2\) 的期望值为:
The expected value of \(X^2\) is
\[\mathrm{E}(X^2) = \sum x^2 P(X = x) = \frac{1}{6}(1 + 4 + \cdots + 36) = \frac{91}{6}\]
所以使用另一种公式:
So using the alternative formula
\[\operatorname{Var}(X) = \mathrm{E}(X^2) - [\mathrm{E}(X)]^2 = \frac{91}{6} - \frac{49}{4} = \frac{35}{12}\]
技巧提示 / Tip:
通常使用这种方法来求随机变量的方差更快。
It is usually quicker to use this method to find the variance of a random variable.
方差的关键特征:
Key Features of Variance:
学习建议 / Learning Tips:
熟练掌握方差的两种计算方法,特别是第二种方法通常更高效。多做练习有助于加深理解。
Master both methods for calculating variance, especially the second method which is usually more efficient. More practice helps deepen understanding.